/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package config.Models;

import config.ConfigMacros;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author LinhTA
 */
public class Require {
    
    public int gold = 0;
    public int coin = 0;
    public int level =1 ;
    
     public Require(Map<String, Object> obj)
    {
        try
        {
            gold = Integer.parseInt(obj.get(ConfigMacros.GOLD).toString());
        }
        catch(Exception e)
        {}
        try
        {
            coin = Integer.parseInt(obj.get(ConfigMacros.COIN).toString());
        }
         catch(Exception e)
        {}
        try
        {
            level = Integer.parseInt(obj.get(ConfigMacros.LEVEL).toString());
        }
         catch(Exception e)
        {}
        
        
    }
}
